package cn.zspt.vank.mapper;

import cn.zspt.vank.domain.*;
import cn.zspt.vank.domain.dto.OrderQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderMapper {
    List<Dish> findDishByCategory(int categoryId);
    List<Category> findAllCategory();
    List<User>  findAllUser();
    boolean createOrder(Order order);
    boolean saveOrderItem(OrderItem orderItem);
    List<Order> findOrderTodayByUser(int userId);
    List<Order> findOrderByQuery(OrderQuery orderQuery);
    boolean takeOrder(int orderId);
    List<OrderItem> findOrderItems(int orderId);
    void payOrder(int orderId);
    void abortOrder(int orderId);
}
